//
//  TapImageView.m
//  Kugou-OC
//
//  Created by BH on 16/6/7.
//  Copyright © 2016年 Sunny. All rights reserved.
//

#import "TapImageView.h"

@implementation TapImageView

-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.userInteractionEnabled = YES;
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapImage:)];
        [self addGestureRecognizer:tap];
    }
    return self;
}

-(void)tapImage:(id)sender{
    UITapGestureRecognizer *tap = (UITapGestureRecognizer *)sender;
    
    UIImageView *tapView = (UIImageView *)tap.view;
    
    if (self.Taphandle) {
        self.Taphandle(tapView);
    }
}

@end
